home *** CD-ROM | disk | FTP | other *** search
/ Games of Daze / Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso / x2ftp / msdos / libs / tool7v13 / tool7v13.doc < prev    next >
Text File  |  1994-09-25  |  95KB  |  2,163 lines

  1. ┌──────────────────────────────────────────────────────────────────────────────┐
  2. │ ░░░░░░░░░░░░░ The "Complete" Borland Turbo Pascal 7.0 Toolbox ░░░░░░░░░░░░░░ │
  3. ├┬┬┬┬┬┬──────────────────────────────────────────────────────────────────┬┬┬┬┬┬┤
  4. ├┼┼┼┼┼┘                                                                  └┼┼┼┼┼┤
  5. ├┼┼┼┼┘                            Version 1.3                             └┼┼┼┼┤
  6. ├┼┼┼┘                                                                      └┼┼┼┤
  7. ├┼┼┘     Written by Thayne Breetzke   Copyright (c) 1994, Sphinx Software   └┼┼┤
  8. ├┼┘                                                                          └┼┤
  9. └┴────────────────────────────────────────────────────────────────────────────┴┘
  10.  
  11.  
  12.                                     Contents
  13. - ---──────────────────────────────────────────────────────────────────────--- -
  14.  
  15.     INTRODUCTION
  16.         Introduction and legal stuff
  17.         How to use the Toolbox
  18.         Contacting the author
  19.  
  20.     CURSOR ROUTINES
  21.         CursorOff
  22.         CursorOn
  23.         SaveCursorPos
  24.         RestoreCursorPos
  25.  
  26.     SCREEN ROUTINES
  27.         CalcAttr
  28.         VideoMem
  29.         DisplayType
  30.         DisplayTypeDesc
  31.         VideoMode
  32.         VideoModeDesc
  33.         RowsOnScreen
  34.         ColsOnScreen
  35.         SaveArea
  36.         RestoreArea
  37.         ChangeAttr
  38.         ClearArea
  39.         WriteMem
  40.         WriteXY
  41.         SetVideoMode
  42.         ScrollUp
  43.         ScrollDown
  44.         ScrollRight
  45.         ScrollLeft
  46.         ScreenOn
  47.         ScreenOff
  48.         SetBorder
  49.  
  50.     INPUT ROUTINES
  51.         WaitForKeypress
  52.         Suspend
  53.         GetKey
  54.         ReadString
  55.         ReadDate
  56.         ReadTime
  57.         ReadReal
  58.         ReadChoice
  59.  
  60.     MOUSE ROUTINES
  61.         MouseLocate
  62.         SetHercGraph
  63.         MInstalled
  64.         MReset
  65.         MButtons
  66.         SetMouseLimit
  67.         SetMousePos
  68.         ShowMouse
  69.         HideMouse
  70.         ReadMouseMotion
  71.         ResetMouseMovement
  72.         ReadMouseMovement
  73.         MouseXCor
  74.         MouseYCor
  75.         ButtonPressed
  76.         AnyButtonPressed
  77.         GetPressInfo
  78.         GetReleaseInfo
  79.         SetSensitivity
  80.         GetSensitivity
  81.         SetGraphicsCursor
  82.         SoftwareTextCursor
  83.         HardwareTextCursor
  84.         MArea
  85.  
  86.     STRING MANIPULATION ROUTINES
  87.         Spaces
  88.         Center
  89.         CopyChar
  90.         StrToNum
  91.         NumToStr
  92.         LeftTrim
  93.         RightTrim
  94.         Upper
  95.         Lower
  96.         BoolToStr
  97.         StrToBool
  98.  
  99.     DATE/TIME ROUTINES
  100.         CountryCode
  101.         CountryDateFormat
  102.         CountryCurrency
  103.         CountryThouSep
  104.         CountryDecSep
  105.         CountryDateSep
  106.         CountryTimeSep
  107.         CountryCurrFormat
  108.         CountryTimeFormat
  109.         LeapYear
  110.         DaysinMonth
  111.         DayOfWeek
  112.         DayOfWeekDesc
  113.         DayofYear
  114.         MonthDesc
  115.         DateStr
  116.         ValidDate
  117.         TimeStr
  118.         SecondsToTime
  119.  
  120.     WINDOW ROUTINES
  121.         WriteWinXY
  122.         WriteWinChar
  123.         OpenWindow
  124.         CloseWindow
  125.         DrawBox
  126.  
  127.     VGA ROUTINES
  128.         FadeOut
  129.         FadeIn
  130.         GetPalette
  131.         SetPalette
  132.         WaitForRetrace
  133.  
  134.     BIOS ROUTINES
  135.         Wait
  136.         Beep
  137.         WarmBoot
  138.         ColdBoot
  139.         SetTypematicRate
  140.         ResetTypematicRate
  141.         RShiftPressed
  142.         LShiftPressed
  143.         CtrlPressed
  144.         AltPressed
  145.         ScrollLockOn
  146.         NumLockOn
  147.         CapsLockOn
  148.         InsertOn
  149.         LCtrlPressed
  150.         LAltPressed
  151.         RCtrlPressed
  152.         RAltPressed
  153.         SysPressed
  154.         SuspendToggled
  155.         ScrollLockPressed
  156.         NumLockPressed
  157.         CapsPressed
  158.         InsertPressed
  159.         SetScrollLockOn
  160.         SetNumLockOn
  161.         SetCapsLockOn
  162.         SetInsertOn
  163.         SetScrollLockOff
  164.         SetNumLockOff
  165.         SetCapsLockOff
  166.         SetInsertOff
  167.         NumHardDisks
  168.         NumFloppies
  169.         ActiveFloppy
  170.         PrinterStatus
  171.         PrinterTimeOut
  172.         PrinterIOError
  173.         PrinterSelected
  174.         PrinterOutOfPaper
  175.         PrinterAcknowledge
  176.         PrinterNotBusy
  177.         MathCoPresent
  178.         DMAInstalled
  179.         NumSerialPorts
  180.         GameAdapterPresent
  181.         NumPrinterPorts
  182.  
  183.     MICELLANEOUS ROUTINES
  184.         CommandLine
  185.         KeyBoardOff
  186.         KeyBoardOn
  187.         ClearKeyBuffer
  188.         CPUType
  189.         GetCPUSpeed
  190.         SetPauseOff
  191.         SetPauseOn
  192.         SetPrtScrOff
  193.         SetPrtScrOn
  194.  
  195.     EDITOR ROUTINES
  196.         InitBuffer
  197.         FreeBuffer
  198.         ClearBuffer
  199.         EditText
  200.         LoadBuffer
  201.         SaveBuffer
  202.  
  203.     FILE ROUTINES
  204.         Exists
  205.         FileMatch
  206.         IsDirectory
  207.  
  208.     LZH ROUTINES
  209.         InitLZHBuffers
  210.         FreeLZHBuffers
  211.         Encode
  212.         Decode
  213.  
  214.     PARSER ROUTINES
  215.         Switches
  216.         InvalidSwitch
  217.         SwitchPos
  218.         SwitchData
  219.         NumParams
  220.         Param
  221.  
  222.  
  223.                                   Introduction
  224. - ---──────────────────────────────────────────────────────────────────────--- -
  225.  
  226. This toolbox was created to provide a wide variety of Turbo Pascal routines
  227. for the Turbo Pascal programmer.  Using them will eliminate all the messy bits
  228. of code from your programs allowing you to focus on the programs' requirements.
  229. The routines are very useful and easy to use and include mouse routines, string
  230. manipulation routines, input routines, window routines, BIOS routines and more.
  231.  
  232. If you feel you would like a routine added, or have found any bugs (doubtful!),
  233. or have any comments, feel free to mail me at the address below.
  234.  
  235.  
  236. ■ This software is free (yes, believe it or not!). You may distribute it freely
  237.   as long as you don't charge a fee for it.  The units provided are for
  238.   evaluation purposes only.  A garbled archive is included containing the
  239.   registered versions of the units.  If you wish to continue using these units
  240.   please mail me at the address below stating your NAME and E-MAIL ADDRESS and
  241.   I will send you a registration number which is to be entered as the password
  242.   when extracting the garbled archive.  If you do not have an e-mail address you
  243.   must send your postal address.  If you will be sending this information via
  244.   the postal service please include a self-addressed stamped envelope to allow
  245.   me to send you the registration number.
  246.  
  247.   Thereafter, the software is yours.  It's that simple. I would appreciate it if
  248.   you included my name in your programs that use these units.
  249.  
  250.   This response will enable me to determine how popular the toolbox is.  The
  251.   more response I receive the more encouraged I will be to continue to expand
  252.   and update it.
  253.  
  254. ■ The author and any distributor of this software assumes no responsibility
  255.   for damages resulting from this software or its use due to errors, omissions,
  256.   incompatibility with other software or hardware, or misuse; and specifically
  257.   disclaim any implied warranty of fitness for any particular purpose or
  258.   application.  Every care has been taken, however, to ensure that the routines
  259.   behave as stated.
  260.  
  261. ■ Turbo Pascal is a registered trademark of Borland International, Inc.
  262.  
  263.  
  264. USING THE TOOLBOX
  265.  
  266. To use the units in your own Turbo Pascal programs, simply include the name of
  267. the required unit in the "uses" statement of your program.  A detailed
  268. explanation of each unit and its routines follows.
  269.  
  270.  
  271.                              CONTACTING THE AUTHOR
  272.  
  273.         The author can be contacted at the following addresses:
  274.  
  275.         ■ E-mail: 9216189@ml.petech.ac.za
  276.  
  277.         ■ Normal mail: Thayne Breetzke
  278.                        7 Nahoon Valley Place
  279.                        Nahoon Valley
  280.                        East London
  281.                        5241
  282.                        South Africa
  283.  
  284.           (Any donations may be sent to the above address - thanks...)
  285.  
  286.         Note: You are REQUIRED to mail me your NAME and E-MAIL ADDRESS to
  287.               receive your registration number for the garbled archive if
  288.               you intend using this software. (Hey, it's the least you
  289.               could do!)
  290.  
  291.         I welcome any comments or suggestions.  Your support and
  292.         response will encourage me to continue to support this software.
  293.  
  294.  
  295.                                 CURSOR ROUTINES
  296. - ---──────────────────────────────────────────────────────────────────────--- -
  297.  
  298. UNIT NAME: Cursor.tpu
  299.  
  300.  
  301. PUBLIC DEFINITIONS
  302.  
  303. Type
  304.   CStateRec = Record
  305.                 InsertKey,
  306.                 CursorState: Boolean;
  307.                 InsertType,
  308.                 XCor,
  309.                 YCor       : Byte;
  310.               end;
  311. {      This is the record used for storing the cursor state.                   }
  312.  
  313. Var
  314.   CursorState : Boolean;
  315. {      Holds a TRUE value if the cursor is on; a FALSE value if it is off.
  316.        Used for reference only ie DO NOT ALTER THIS VALUE.  Defaults to TRUE.  }
  317.  
  318.   InsertType  : Byte;
  319. {      A user-definable variable used for setting the cursor type.  The effect
  320.        noticeable in insert mode only.  1 = Full-block cursor (default),
  321.        2 = Half-block cursor and 3 = Underscore cursor.                        }
  322.  
  323. Procedure CursorOff;
  324. {      Turns the cursor off                                                    }
  325.  
  326. Procedure CursorOn(InsertKey: Boolean);
  327. {      Turns the cursor on.  Set InsertKey to TRUE to set it to insert mode,
  328.        or FALSE to set it to normal mode.                                      }
  329.  
  330. Procedure SaveCursor(InsertKey: Boolean; Var CState: CStateRec);
  331. {      Saves the cursor position, state and insert type.  Set InsertKey to TRUE
  332.        if the cursor is in insert mode, else set it to FALSE. Useful for saving
  333.        the cursor position when opening a full-screen window at the start
  334.        of a program in order to restore the original DOS screen upon exiting.
  335.        Use RestoreCursorPos to restore the cursor (see below).  A variable of
  336.        type CStateRec must be passed to hold the cursor state.                 }
  337.  
  338. Procedure RestoreCursor(CState: CStateRec);
  339. {      Used to restore the cursor position, state and insert type after being
  340.        saved using SaveCursorPos (see above) using the cursor state record
  341.        provided.                                                               }
  342.  
  343.  
  344. COMMENTS
  345.  
  346. These routines take the current video mode into consideration (eg hercules or
  347. vga).
  348.  
  349.  
  350.                                 SCREEN ROUTINES
  351. - ---──────────────────────────────────────────────────────────────────────--- -
  352.  
  353. UNIT NAME: Screen.tpu
  354.  
  355.  
  356. PUBLIC DEFINITIONS
  357.  
  358. Function  CalcAttr(FGround, BGround: Byte): Byte;
  359. {      Calculates a colour using the FGround and BGround.
  360.  
  361.        ie Colour = FGround + (BGround * 16)                                    }
  362.  
  363. Function  VideoMem: Word;
  364. {      Returns the base address of video memory ie $B000 for monochrome card
  365.        and $B800 for graphics card.                                            }
  366.  
  367. Function  DisplayType: Byte;
  368. {      Returns the type of display being used.  Possible values are as follows:
  369.        DispType = $00  No display
  370.                   $01  MDA with monochrome display
  371.                   $02  CGA with colour display
  372.                   $03  Reserved
  373.                   $04  EGA with colour display
  374.                   $05  EGA with monochrome display
  375.                   $06  Professional graphics controller
  376.                   $07  VGA with analog monochrome display
  377.                   $08  VGA with analog colour display
  378.                   $09  Reserved
  379.                   $0A  MCGA with digital colour display
  380.                   $0B  MCGA with analog monochrome display
  381.                   $0C  MCGA with analog colour display
  382.                   $FF  Unrecognized video system                               }
  383.  
  384. Function  DisplayTypeDesc(DispType: Byte): String;
  385. {      Returns a description of the type of display being used.  See above for
  386.        the possible descriptions.                                              }
  387.  
  388. Function  VideoMode: Byte;
  389. {      Returns the current video mode.  Possible values are as follows:
  390.        VidMode = $00  40x25 B/W text (CGA,EGA,MCGA,VGA)
  391.                = $01  40x25 16 color text (CGA,EGA,MCGA,VGA)
  392.                = $02  80x25 16 shades of gray text (CGA,EGA,MCGA,VGA)
  393.                = $03  80x25 16 color text (CGA,EGA,MCGA,VGA)
  394.                = $04  320x200 4 color graphics (CGA,EGA,MCGA,VGA)
  395.                = $05  320x200 4 color graphics (CGA,EGA,MCGA,VGA)
  396.                = $06  640x200 B/W graphics (CGA,EGA,MCGA,VGA)
  397.                = $07  80x25 Monochrome text (MDA,HERC,EGA,VGA)
  398.                = $08  160x200 16 color graphics (PCjr)
  399.                = $09  320x200 16 color graphics (PCjr)
  400.                = $0A  640x200 4 color graphics (PCjr)
  401.                = $0B  Reserved (EGA BIOS function 11)
  402.                = $0C  Reserved (EGA BIOS function 11)
  403.                = $0D  320x200 16 color graphics (EGA,VGA)
  404.                = $0E  640x200 16 color graphics (EGA,VGA)
  405.                = $0F  640x350 Monochrome graphics (EGA,VGA)
  406.                = $10  640x350 16 color graphics (EGA or VGA with 128K)
  407.                       640x350 4 color graphics (64K EGA)
  408.                = $11  640x480 B/W graphics (MCGA,VGA)
  409.                = $12  640x480 16 color graphics (VGA)
  410.                = $13  320x200 256 color graphics (MCGA,VGA)
  411.                = $8x  EGA, MCGA or VGA ignore bit 7
  412.                = $9x  EGA, MCGA or VGA ignore bit 7                            }
  413.  
  414. Function  VideoModeDesc(VidMode: Byte): String;
  415. {      Returns a description of the current video mode.  See above for the
  416.        possible descriptions.                                                  }
  417.  
  418. Function  RowsOnScreen: Byte;
  419. {      Returns the number of rows on the screen.                               }
  420.  
  421. Function  ColsOnScreen: Word;
  422. {      Returns the number of columns on the screen.                            }
  423.  
  424. Procedure SaveArea(X1,Y1,X2,Y2: Byte; Var ScrBuffer: ScrBufferRec);
  425. {      Saves the specified area of a text screen.  ScrBuffer is a variable
  426.        declared as ScrBufferRec (defined in this unit).  You must use
  427.        RestoreArea before re-saving an area in the same variable to deallocate
  428.        memory.  See below for a description of RestoreArea.                    }
  429.  
  430. Procedure RestoreArea(Var ScrBuffer: ScrBufferRec);
  431. {      Restores the area previously saved in the specified variable using
  432.        SaveArea.                                                               }
  433.  
  434. Procedure SaveLine(YCor: Byte; Var TheString: String);
  435. {      Saves the specified line of a text screen into TheString.  If you save
  436.        a line without restoring it, the previously saved data will be
  437.        overwritten with the new data.                                          }
  438.  
  439. Procedure RestoreLine(YCor: Byte; Var TheString: String);
  440.  
  441. {      Restores the previously saved line to the specified line of a text
  442.        screen, using the data in TheString.                                    }
  443.  
  444. Procedure ChangeAttr(X1,Y1,X2,Y2,Colour: Word);
  445. {      Changes the attributes of the specified area of a text screen to the
  446.        specified attribute (Colour).                                           }
  447.  
  448. Procedure ClearArea(X1,Y1,X2,Y2,Colour: Byte; TheChar: Char);
  449. {      Clears the specified area of a text screen, changing the attribute of
  450.        the area to the specified attribute (Colour) and fills the area with the
  451.        specified filler character (TheChar).                                   }
  452.  
  453. Procedure WriteMem(X,Y: Byte; TheText: String);
  454. {      Writes TheText directly to screen memory at position (X,Y).  This is a
  455.        fast write routine.  The attributes on the screen are not changed in any
  456.        way.                                                                    }
  457.  
  458. Procedure WriteXY(X,Y: Byte; TheText: String; Colour: Byte);
  459. {      Writes TheText to a text screen at position (X,Y) using the specified
  460.        attribute (Colour).                                                     }
  461.  
  462. Procedure SetVideoMode(VidMode: Byte);
  463. {      Sets the video mode to the specified mode.  Refer to the function
  464.        VideoMode above for a complete list of possible values for VidMode.     }
  465.  
  466. Procedure ScrollUp(X1,Y1,X2,Y2,NumLines,Colour: Byte);
  467. {      Scrolls the specified area of a text screen up NumLines lines using
  468.        the specified attribute (Colour) for the new bottom line.                   }
  469.  
  470. Procedure ScrollDown(X1,Y1,X2,Y2,NumLines,Colour: Byte);
  471. {      Scrolls the specified area of a text screen down NumLines lines
  472.        using the specified attribute (Colour) for the new top line.            }
  473.  
  474. Procedure ScrollRight(X1,Y1,X2,Y2,NumLines,Colour: Byte);
  475. {      Scrolls the specified area of a text screen right NumLines lines
  476.        using the specified attribute (Colour) for the new line.                }
  477.  
  478. Procedure Scrolleft(X1,Y1,X2,Y2,NumLines,Colour: Byte);
  479. {      Scrolls the specified area of a text screen left NumLines lines
  480.        using the specified attribute (Colour) for the new line.                }
  481.  
  482. Procedure ScreenOn;
  483.  
  484. {      Sets the screen on after being turned off using ScreenOff.              }
  485.  
  486. Procedure ScreenOff;
  487.  
  488. {      Sets the screen off.  Use ScreenOn to turn it back on.  This is very
  489.        useful when drawing a screen, especially when the process is slow.  Once
  490.        it is drawn the screen can turned to show the results instantly.        }
  491.  
  492. Procedure SetBorder(Colour: Byte);
  493.  
  494. {      Sets the border colour to the specified colour.                         }
  495.  
  496.  
  497. COMMENTS
  498.  
  499. To compute the Colour attribute use CalcAttr or perform the following:
  500.  
  501.   Colour = Foreground + Background * 16
  502.  
  503.  
  504.                                  INPUT ROUTINES
  505. - ---──────────────────────────────────────────────────────────────────────--- -
  506.  
  507. UNIT NAME: Input.tpu
  508.  
  509.  
  510. PUBLIC DEFINITIONS
  511.  
  512. Type
  513.   CharSet = Set of Char;
  514.  
  515. Var
  516.   InsertKey: Boolean;
  517. {      Holds a TRUE value if insert mode is active else a FALSE value if it
  518.        is not.                                                                 }
  519.  
  520. Procedure WaitForKeypress;
  521. {      Waits for a keypress.  The keyboard buffer is flushed after a key is
  522.        pressed.                                                                }
  523.  
  524. Procedure Suspend(Var Key: Char; Var Extended: Boolean; Sec100: Word;
  525.                   DoUpdate: Boolean; UpDateProc: Routine; UpdateVar: Word);
  526. {      This procedure suspends processing for Sec100 hundredths of a second or
  527.        until a key is pressed.  The parameters are as follows:
  528.  
  529.        Key:          Returns the key the user pressed.  If no key was pressed,
  530.                      it contains a value of #0.
  531.        Extended:     Returns TRUE if the key pressed was an extended key else
  532.                      FALSE if it was not.
  533.        Sec100:       Number of hundredths of a second to suspend processing.
  534.        DoUpDate:     If TRUE is specified then the routine will execute the
  535.                      update procedure specified in the next parameter of this
  536.                      routine, else it will not.
  537.        UpdateProc:   This is the update routine that will be executed while
  538.                      the routine waits for a keypress, provided that DoUpDate
  539.                      was set to TRUE.  This is a powerful feature added
  540.                      recently to allow, for example, a clock to be displayed,
  541.                      or to trap additional keys like F1 or ALT-X and execute
  542.                      a procedure for each.  Refer to the comments below with
  543.                      regard to using this procedure.
  544.        UpdateVar:    This variable is passed to the above UpdateProc.          }
  545.  
  546. Procedure GetKey(Var Key: Char; Var Extended: Boolean;
  547.                  NormalKeys: CharSet; ExtendedKeys: CharSet;
  548.                  DoWait: Boolean; DoUpdate: Boolean; UpdateProc: Routine;
  549.                  UpdateVar: Word);
  550. {      This routine's basic function is to get a keypress from the user.  There
  551.        are a wide variety of parameters which make it a powerful routine.  They
  552.        are as follows:
  553.  
  554.        Key:          Returns the key the user pressed (if one was pressed).
  555.        Extended:     Returns TRUE if the key pressed was an extended key else
  556.                      FALSE if it was not.
  557.        NormalKeys:   This is a set of legal normal keys the user may press.
  558.                      eg 'A',ENTER,SPACE.
  559.        ExtendedKeys: This is a set of legal extended keys the user may press.
  560.                      eg F1,ALT-X,ALT-P.
  561.        DoWait:       If TRUE is specified then the routine will wait for a
  562.                      keypress, else it will not.
  563.        DoUpDate:     If TRUE is specified then the routine will execute the
  564.                      update procedure specified in the next parameter of this
  565.                      routine, else it will not.
  566.        UpdateProc:   This is the update routine that will be executed while
  567.                      the routine waits for a keypress, provided that DoUpDate
  568.                      was set to TRUE.  This is a powerful feature added
  569.                      recently to allow, for example, a clock to be displayed,
  570.                      or to trap additional keys like F1 or ALT-X and execute
  571.                      a procedure for each.  Refer to the comments below with
  572.                      regard to using this procedure.
  573.        UpdateVar:    This variable is passed to the above UpdateProc.          }
  574.  
  575. Procedure ReadString(Var InputString: String; X, Y, StringLength, BoxSize: Byte;
  576.                      LegalChars: CharSet; UpperOnly: Boolean;
  577.                      NormalEndChars: CharSet; ExtEndChars: CharSet;
  578.                      Var TerminateChar: Char; Var Extended: Boolean;
  579.                      DoUpdate, AtTheEnd: Boolean; Colour: Byte;
  580.                      UpdateProc: Routine; UpdateVar: Word);
  581. {      This routine accepts input from the user and stores it in the specified
  582.        string variable.  The various parameters are explained below:
  583.  
  584.        InputString:    This string hold the text to be edited or entered.  Note
  585.                        that if it contains a value, that value will be displayed
  586.                        allowing the user to edited it.  Therefore, assign this
  587.                        field a '' value to allow the user to type a new value.
  588.        X:              Specifies the X-position of the entry area.
  589.        Y:              Specifies the Y-position of the entry area.
  590.        StringLength:   Specifies the maximum number of characters the user is
  591.                        allowed to enter.
  592.        BoxSize:        Specifies the size of the entry area in characters plus
  593.                        2.  The BoxSize, for example, may be 24 while the
  594.                        StringLength may be 200 allowing the user to enter 200
  595.                        character within an area of 24 characters.
  596.        LegalChars:     This is a set containing the legal characters the user
  597.                        may enter.
  598.        UpperOnly:      If TRUE is specified then all characters entered will be
  599.                        changed to uppercase.
  600.        NormalEndChars: This is a set of legal normal keys the user may press to
  601.                        end the input eg ENTER,CTRL-ENTER.
  602.        ExtEndChars:    This is a set of legal extended keys the user may press
  603.                        to terminate the input eg ALT-X,ALT-P.
  604.        TerminateChar:  Returns the key the user pressed to terminate the input.
  605.        Extended:       Returns TRUE if the terminate key was an extended key
  606.                        else FALSE if it was not.
  607.        DoUpDate:       If TRUE is specified then the routine will execute the
  608.                        update procedure specified in the UpdateProc parameter
  609.                        of this routine, else it will not.
  610.        AtTheEnd:       If TRUE is specified the cursor will be positioned to
  611.                        end of the string value to be edited else it will be
  612.                        placed at the beginning.
  613.        Colour:         Specifies the attribute to use for the data entry area.
  614.        UpdateProc:     This is the update routine that will be executed while
  615.                        the routine waits for a keypress, provided that DoUpDate
  616.                        was set to TRUE.  This is a powerful feature added
  617.                        recently to allow, for example, a clock to be displayed,
  618.                        or to trap additional keys like F1 or ALT-X and execute
  619.                        a procedure for each.  Refer to the comments below with
  620.                        regard to using this procedure.
  621.        UpdateVar:      This variable is passed to the above UpdateProc.
  622.  
  623.        The following keys may be used during data input:
  624.  
  625.        Left-arrow:  Moves the cursor one position to the left.
  626.        Right-arrow: Moves the cursor one position to the right.
  627.        Home:        Moves the cursor to the beginning of the entry area.
  628.                     Repetitive presses will move it left BoxSize minus 2
  629.                     characters.
  630.        End:         Moves the cursor to the end of the entry area.  Repetitive
  631.                     presses will move it right BoxSize minus 2 characters.
  632.        Ctrl-Home:   Moves the cursor to the beginning of the input string.
  633.        Ctrl-End:    Moves the cursor to the end of the input string.
  634.        Backspace:   Deletes the character to the left of the cursor.
  635.        Delete:      Deletes the character beneath the cursor.
  636.        Insert:      Toggles insert mode.
  637.        Ctrl-Y:      Deletes the input string.
  638.        Ctrl-Left:   Moves the cursor one word to the left.
  639.        Ctrl-Right:  Moves the cursor one word to the right.                    }
  640.  
  641. Procedure ReadDate(Var InputYear,InputMonth,InputDay: Word; X, Y,
  642.                    Format: Byte; DateSep: Char; NormalEndChars, ExtEndChars,
  643.                    NormalORChars, ExtORChars: CharSet; Var TerminateChar: Char;
  644.                    Var Extended: Boolean; Hz, Ms: Word; DoUpdate,
  645.                    AtTheEnd: Boolean; Colour: Byte; UpdateProc: Routine;
  646.                    UpdateVar:Word);
  647. {      This routine accepts a date from the user.  The procedure will not
  648.        terminate until a valid date has been entered or a key is pressed that
  649.        overrides the validation checks.  The various parameters are explained
  650.        below:
  651.        
  652.        InputYear:      Holds the year value to be edited.  If it contains a
  653.                        value on entry into the procedure, the user will be able
  654.                        to edit it.  Initialize it to 0 if you wish to have the
  655.                        user enter a new year value.
  656.        InputMonth:     Holds the month of the year value to be edited.  If it
  657.                        contains a value on entry into the procedure, the user
  658.                        will be able to edit it.  Initialize it to 0 if you wish
  659.                        to have the user enter a new month value.
  660.        InputDay:       Holds the day of the month value to be edited.  If it
  661.                        contains a value on entry into the procedure, the user
  662.                        will be able to edit it.  Initialize it to 0 if you wish
  663.                        to have the user enter a new day value.
  664.        X:              Specifies the X-position of the entry area.
  665.        Y:              Specifies the Y-position of the entry area.
  666.        Format:         Specifies the format to be used.  Valid formats are:
  667.  
  668.                          0:  mm/dd/yy
  669.                          1:  dd/mm/yy
  670.                          2:  dd/mm/yyyy
  671.                          3:  mm/dd/yyyy
  672.  
  673.        DateSep:        Specifies the date separator to use.
  674.        NormalEndChars: This is a set of legal normal keys the user may press to
  675.                        end the input eg ENTER,CTRL-ENTER.
  676.        ExtEndChars:    This is a set of legal extended keys the user may press
  677.                        to terminate the input eg ALT-X,ALT-P.
  678.        NormalORChars:  This is a set of legal normal keys the user may press to
  679.                        end the input eg ENTER,CTRL-ENTER and skip validation
  680.                        checks.
  681.        ExtORChars:     This is a set of legal extended keys the user may press
  682.                        to terminate the input eg ALT-X,ALT-P and skip validation
  683.                        checks.
  684.        TerminateChar:  Returns the key the user pressed to terminate the input.
  685.        Extended:       Returns TRUE if the terminate key was an extended key,
  686.                        else FALSE if it was not.
  687.        Hz, Ms:         Specifies the frequency (Hz) and the length in milli-
  688.                        seconds (Ms) of the sound emitted when the value entered
  689.                        is invalid.
  690.        DoUpDate:       If TRUE is specified then the routine will execute the
  691.                        update procedure specified in the UpdateProc parameter
  692.                        of this routine, else it will not.
  693.        AtTheEnd:       If TRUE is specified the cursor will be positioned to
  694.                        end of the string value to be edited else it will be
  695.                        placed at the beginning.
  696.        Colour:         Specifies the attribute to use for the data entry area.
  697.        UpdateProc:     This is the update routine that will be executed while
  698.                        the routine waits for a keypress, provided that DoUpDate
  699.                        was set to TRUE.  This is a powerful feature added
  700.                        recently to allow, for example, a clock to be displayed,
  701.                        or to trap additional keys like F1 or ALT-X and execute
  702.                        a procedure for each.  Refer to the comments below with
  703.                        regard to using this procedure.
  704.        UpdateVar:      This variable is passed to the above UpdateProc.
  705.  
  706.        The following keys may be used during data input:
  707.  
  708.        Left-arrow:  Moves the cursor one position to the left.
  709.        Right-arrow: Moves the cursor one position to the right.
  710.        Home:        Moves the cursor to the beginning of the entry area.
  711.        End:         Moves the cursor to the end of the entry area.
  712.        DateSep:     Moves the cursor to the position following the next
  713.                     date separator.
  714.        Delete:      Deletes the character beneath the cursor.
  715.        Insert:      Toggles insert mode.
  716.        Ctrl-Y:      Deletes the input date.
  717.        Ctrl-Left:   Moves the cursor to the previous date unit (dd, mm or yy).
  718.        Ctrl-Right:  Moves the cursor to the next date unit (dd, mm or yy).     }
  719.  
  720. Procedure ReadTime(Var InputHour, InputMin, InputSec: Word; X, Y: Byte;
  721.                    NormalEndChars, ExtEndChars, NormalORChars,
  722.                    ExtORChars: CharSet; Var TerminateChar: Char;
  723.                    Var Extended: Boolean; Hz, Ms: Word; DoUpdate,
  724.                    AtTheEnd: Boolean; Colour: Byte; UpdateProc: Routine;
  725.                    UpdateVar:Word);
  726. {      This routine accepts a time from the user.  The procedure will not
  727.        terminate until a valid time has been entered or a key is pressed that
  728.        overrides the validation checks.  The various parameters are explained
  729.        below:
  730.  
  731.        InputHour:      Holds the hour value to be edited.  If it contains a
  732.                        value on entry into the procedure, the user will be able
  733.                        to edit it.  Initialize it to 0 if you wish to have the
  734.                        user enter a new hour value.
  735.        InputMin:       Holds the minutes value to be edited.  If it contains a
  736.                        value on entry into the procedure, the user will be able
  737.                        to edit it.  Initialize it to 0 if you wish to have the
  738.                        user enter a new minutes value.
  739.        InputSec:       Holds the seconds value to be edited.  If it contains a
  740.                        value on entry into the procedure, the user will be able
  741.                        to edit it.  Initialize it to 0 if you wish to have the
  742.                        user enter a new seconds value.
  743.        X:              Specifies the X-position of the entry area.
  744.        Y:              Specifies the Y-position of the entry area.
  745.        NormalEndChars: This is a set of legal normal keys the user may press to
  746.                        end the input eg ENTER,CTRL-ENTER.
  747.        ExtEndChars:    This is a set of legal extended keys the user may press
  748.                        to terminate the input eg ALT-X,ALT-P.
  749.        NormalORChars:  This is a set of legal normal keys the user may press to
  750.                        end the input eg ENTER,CTRL-ENTER and skip validation
  751.                        checks.
  752.        ExtORChars:     This is a set of legal extended keys the user may press
  753.                        to terminate the input eg ALT-X,ALT-P and skip validation
  754.                        checks.
  755.        TerminateChar:  Returns the key the user pressed to terminate the input.
  756.        Extended:       Returns TRUE if the terminate key was an extended key,
  757.                        else FALSE if it was not.
  758.        Hz, Ms:         Specifies the frequency (Hz) and the length in milli-
  759.                        seconds (Ms) of the sound emitted when the value entered
  760.                        is invalid.
  761.        DoUpDate:       If TRUE is specified then the routine will execute the
  762.                        update procedure specified in the UpdateProc parameter
  763.                        of this routine, else it will not.
  764.        AtTheEnd:       If TRUE is specified the cursor will be positioned to
  765.                        end of the string value to be edited else it will be
  766.                        placed at the beginning.
  767.        Colour:         Specifies the attribute to use for the data entry area.
  768.        UpdateProc:     This is the update routine that will be executed while
  769.                        the routine waits for a keypress, provided that DoUpDate
  770.                        was set to TRUE.  This is a powerful feature added
  771.                        recently to allow, for example, a clock to be displayed,
  772.                        or to trap additional keys like F1 or ALT-X and execute
  773.                        a procedure for each.  Refer to the comments below with
  774.                        regard to using this procedure.
  775.        UpdateVar:      This variable is passed to the above UpdateProc.
  776.  
  777.        The following keys may be used during data input:
  778.  
  779.        Left-arrow:  Moves the cursor one position to the left.
  780.        Right-arrow: Moves the cursor one position to the right.
  781.        Home:        Moves the cursor to the beginning of the entry area.
  782.        End:         Moves the cursor to the end of the entry area.
  783.        ':'          Moves the cursor to the position following the next
  784.                     time separator.
  785.        Delete:      Deletes the character beneath the cursor.
  786.        Insert:      Toggles insert mode.
  787.        Ctrl-Y:      Deletes the input time.
  788.        Ctrl-Left:   Moves the cursor to the previous time unit (hh, mm or ss).
  789.        Ctrl-Right:  Moves the cursor to the next time unit (hh, mm or ss.)     }
  790.  
  791. Procedure ReadReal(Var InputReal: Real; X, Y, Size, Decimals: Byte;
  792.                    Sign: Boolean; NormalEndChars,ExtEndChars: CharSet;
  793.                    Var TerminateChar: Char; Var Extended: Boolean;
  794.                    DoUpdate, AtTheEnd: Boolean; Colour: Byte;
  795.                    UpdateProc: Routine; UpdateVar:Word);
  796. {      This routine accepts a real value from the user.  The various parameters
  797.        are explained below:
  798.  
  799.        InputReal:      Holds the real value to be edited.  If it contains a
  800.                        value on entry into the procedure, the user will be able
  801.                        to edit it.  Initialize it to 0 if you wish to have the
  802.                        user enter a new value.
  803.        X:              Specifies the X-position of the entry area.
  804.        Y:              Specifies the Y-position of the entry area.
  805.        Size:           Specifies the total number of significant digits to
  806.                        display, including the number of digits in the Decimals
  807.                        indicator.
  808.        Decimals:       Specifies the number of decimal digits.
  809.        Sign:           If this is TRUE the user will be able to specify a
  810.                        signed real.
  811.        NormalEndChars: This is a set of legal normal keys the user may press to
  812.                        end the input eg ENTER,CTRL-ENTER.
  813.        ExtEndChars:    This is a set of legal extended keys the user may press
  814.                        to terminate the input eg ALT-X,ALT-P.
  815.        TerminateChar:  Returns the key the user pressed to terminate the input.
  816.        Extended:       Returns TRUE if the terminate key was an extended key,
  817.                        else FALSE if it was not.
  818.        DoUpDate:       If TRUE is specified then the routine will execute the
  819.                        update procedure specified in the UpdateProc parameter
  820.                        of this routine, else it will not.
  821.        AtTheEnd:       If TRUE is specified the cursor will be positioned to
  822.                        end of the string value to be edited else it will be
  823.                        placed at the beginning.
  824.        Colour:         Specifies the attribute to use for the data entry area.
  825.        UpdateProc:     This is the update routine that will be executed while
  826.                        the routine waits for a keypress, provided that DoUpDate
  827.                        was set to TRUE.  This is a powerful feature added
  828.                        recently to allow, for example, a clock to be displayed,
  829.                        or to trap additional keys like F1 or ALT-X and execute
  830.                        a procedure for each.  Refer to the comments below with
  831.                        regard to using this procedure.
  832.        UpdateVar:      This variable is passed to the above UpdateProc.
  833.  
  834.        The following keys may be used during data input:
  835.  
  836.        Left-arrow:  Moves the cursor one position to the left.
  837.        Right-arrow: Moves the cursor one position to the right.
  838.        Home:        Moves the cursor to the beginning of the entry area.
  839.        End:         Moves the cursor to the end of the entry area.
  840.        '.'          Moves the cursor to the decimal segment of the real value.
  841.        Delete:      Deletes the character beneath the cursor.
  842.        Backspace:   Deletes the character to the left of the cursor.
  843.        Insert:      Toggles insert mode.
  844.        Ctrl-Y:      Deletes the real value.
  845.        Ctrl-Left:   Moves the cursor to the decimal segment of the real value.
  846.        Ctrl-Right:  Moves the cursor to the beginning of the entry area.       }
  847.  
  848. Procedure ReadChoice(Var InputString: String; Choices: String; X, Y,
  849.                      BoxSize: Byte; NormalEndChars, ExtEndChars: CharSet;
  850.                      Var TerminateChar: Char; Var Extended: Boolean;
  851.                      DoUpdate: Boolean; Colour: Byte; UpdateProc: Routine;
  852.                      UpdateVar: Word);
  853. {      This routine reads a string from the user, where the string is one in a
  854.        list of choices.  The various parameters are explained below:
  855.  
  856.        InputString:    This string hold the choice to be edited or entered.
  857.                        Note that if it contains a value, that value will be
  858.                        displayed allowing the user to edited it.  Therefore,
  859.                        assign this field a '' value to allow the user to type
  860.                        a new value.
  861.        Choices:        This string contains a list of the valid string values
  862.                        that a user can select.  Each choice must be separated by
  863.                        a comma and may have a hotkey.  The format of the string
  864.                        is as follows: 'choice<|hotkey>,choice<|hotkey>,...'.
  865.                        'hotkey' may be a character or an ASCII code.  If an
  866.                        ASCII code is specified, it must be preceded by a '#'.
  867.                        To specify an extended character, preceed the hotkey with
  868.                        an '@' sign.  Here are a few examples:
  869.  
  870.                        'Yes,No'     - A list of two choices, no hotkeys.
  871.                        'Yes|Y,No|N' - A list of two choices, 'Yes' having a
  872.                                       hotkey of 'Y' and 'y', and 'No' having a
  873.                                       hotkey of 'N' and 'n'.
  874.                        'None|#32'   - One choice, having a hotkey of #32, that
  875.                                       is, SPACE.
  876.                        'Exit|@#45'  - One choice, having a hotkey of extended
  877.                                       #45, that is, ALT-X.
  878.        X:              Specifies the X-position of the entry area.
  879.        Y:              Specifies the Y-position of the entry area.
  880.        BoxSize:        Specifies the size of the entry area in characters.
  881.        NormalEndChars: This is a set of legal normal keys the user may press to
  882.                        end the input eg ENTER,CTRL-ENTER.
  883.        ExtEndChars:    This is a set of legal extended keys the user may press
  884.                        to terminate the input eg ALT-X,ALT-P.
  885.        TerminateChar:  Returns the key the user pressed to terminate the input.
  886.        Extended:       Returns TRUE if the terminate key was an extended key
  887.                        else FALSE if it was not.
  888.        DoUpDate:       If TRUE is specified then the routine will execute the
  889.                        update procedure specified in the UpdateProc parameter
  890.                        of this routine, else it will not.
  891.        Colour:         Specifies the attribute to use for the data entry area.
  892.        UpdateProc:     This is the update routine that will be executed while
  893.                        the routine waits for a keypress, provided that DoUpDate
  894.                        was set to TRUE.  This is a powerful feature added
  895.                        recently to allow, for example, a clock to be displayed,
  896.                        or to trap additional keys like F1 or ALT-X and execute
  897.                        a procedure for each.  Refer to the comments below with
  898.                        regard to using this procedure.
  899.        UpdateVar:      This variable is passed to the above UpdateProc.
  900.  
  901.        The following keys may be used during data input:
  902.  
  903.        Hotkeys:     Displays the corresponding choice.
  904.        Up-arrow:    Displays the previous choice in the list.
  905.        Down-arrow:  Displays the next choice in the list.                      }
  906.  
  907.  
  908. COMMENTS
  909.  
  910. The UpdateProc must be defined in your program as follows:
  911.  
  912.   {$F+}
  913.   Procedure UpdateProc(Var Key: Char; Var Extended: Boolean; UpdateVar: Word);
  914.  
  915.   Begin
  916.     { any other code is inserted here }
  917.   end;
  918.   {$F-}
  919.  
  920.   Note that you may change the values that Key and Extended hold from within
  921.   UpdateProc if need be.
  922.  
  923.   An example of a ReadString would be:
  924.  
  925.   ReadString(InputString,5,5,200,24,[#0..#255],True,[#13,#10,#27,#45],[],
  926.              Key,Extended,True,False,112,UpdateProc,0);
  927.  
  928.   A demonstration will more easily show what it does and how UpdateProc is
  929.   used.  Refer to the demo files included.
  930.  
  931.  
  932.                                  MOUSE ROUTINES
  933. - ---──────────────────────────────────────────────────────────────────────--- -
  934.  
  935. UNIT NAME: Mouse.tpu
  936.  
  937.  
  938. PUBLIC DEFINITIONS
  939.  
  940. Type
  941.   Array32Word = Array[0..31] of Word;
  942. {      Type for defining a graphics mouse cursor.                              }
  943.  
  944. Const
  945.   Hand : Array32word = ($ffff,$ffff,$ffff,$ffff,$ffff,$ffff,$ffff,$ffff,
  946.                         $ffff,$ffff,$ffff,$ffff,$ffff,$ffff,$ffff,$ffff,
  947.                         $0000,$0000,$0700,$0500,$0500,$05FC,$0554,$0D54,
  948.                         $1554,$1004,$0804,$0404,$0208,$0208,$0208,$0208);
  949. {      A pre-defined graphics mouse cursor.                                    }
  950.  
  951.                             INITIALIZING THE MOUSE
  952.  
  953. To be able to use the mouse, it must first be initialized.
  954.  
  955. Function MInstalled: Boolean;
  956. {      The above function initializes the mouse and its software and returns
  957.        TRUE if a mouse is installed.
  958.  
  959.        In addition the following is performed:
  960.  
  961.        The mouse is positioned in the center of the screen.
  962.        The mouse cursor is reset and hidden.
  963.        The double speed threshold is set to 64 mickeys per second.
  964.        The horizontal mickey to pixel ratio is set (8 to 8).
  965.        The vertical mickey to pixel ratio is set (16 to 8).
  966.        The maximum width and height are set to maximum for the video mode.
  967.  
  968.        Note: When using a graphics mode, first initialize the graphics mode
  969.              followed by the mouse.                                            }
  970.  
  971. Function MReset: Boolean;
  972. {      This function resets the mouse software, but not the mouse itself. It
  973.        returns TRUE if a mouse is installed.                                   }
  974.  
  975. Function MButtons: Byte;
  976. {      This function returns the number of buttons on the mouse (if
  977.        installed).                                                             }
  978.  
  979. Procedure SetMouseLimit(X1, X2, Y1, Y2: Integer);
  980. {      This procedure sets the minimum and maximum horizontal and vertical
  981.        bounds. This enables you to limit the cursor movement to a certain
  982.        area.                                                                   }
  983.  
  984. Procedure SetMousePos(X, Y: Integer);
  985. {      Use this procedure to position the mouse cursor at the coordinates
  986.        (X,Y).                                                                  }
  987.  
  988. Procedure ShowMouse;
  989. {      This procedure shows the mouse cursor.                                  }
  990.  
  991.  
  992.                          OTHER FUNCTIONS AND PROCEDURES
  993.  
  994. Function MouseXCor: Integer;
  995. {      This function returns the current x-coordinate of the mouse cursor.     }
  996.  
  997. Function MouseYCor: Integer;
  998. {      This function returns the current y-coordinate of the mouse cursor.     }
  999.  
  1000. Procedure ReadMouseMotion(Var Horiz, Vert: Integer);
  1001. {      This procedure returns the mouse motion counters.  Horiz holds the
  1002.        horizontal mickey count and Vert holds the vertical mickey count.  Count
  1003.        values are 1/200 inch intervals.
  1004.  
  1005. Procedure ResetMouseMovement;
  1006. {      This procedure must be called before the following procedure is called.
  1007.        It must be called before each loop that uses ReadMouseMovement, as it
  1008.        initializes variables used by the ReadMouseMovement procedure.  See the
  1009.        demonstration program included.                                         }
  1010.  
  1011. Procedure ReadMouseMovement(Var Horiz, Vert: Integer);
  1012. {      This procedure returns the number of columns the mouse has been moved
  1013.        horizontally (Horiz), and the number of rows the mouse has been moved
  1014.        vertically (Vert).  An upward direction returns a negative value in
  1015.        Vert, a downward direction returns a positive value in Vert, a left
  1016.        direction returns a negative value in Horiz, and a right direction
  1017.        returns a positive value in Horiz.  ResetMouseMovement must be
  1018.        called before this procedure is used (see above).  See the demonstration
  1019.        program included.                                                       }
  1020.  
  1021. Procedure HideMouse;
  1022. {      This procedure hides the mouse cursor.                                  }
  1023.  
  1024. Function ButtonPressed: Byte;
  1025. {      This function returns the last button pressed.                          }
  1026.  
  1027. Function AnyButtonPressed: Boolean;
  1028. {      This function returns TRUE if a mouse button has been pressed.          }
  1029.  
  1030. Procedure GetPressInfo(Button: Byte; Var Presses, XCord, YCord: Integer);
  1031. {      This procedure returns data relating to button presses of the mouse.
  1032.        The parameters are as follows:
  1033.  
  1034.        Button:  0 for left button
  1035.                 1 for right button
  1036.        Presses: Count of button presses (set to zero after call).
  1037.        XCord:   Horizontal position of mouse cursor at last press.
  1038.        YCord:   Vertical position of mouse cursor at last press.               }
  1039.  
  1040. Procedure GetReleaseInfo(Button: Byte; Var Releases, XCord, YCord: Integer);
  1041. {      This procedure returns data relating to button releases of the mouse.
  1042.        The parameters are as follows:
  1043.  
  1044.        Button:   0 for left button
  1045.                  1 for right button
  1046.        Releases: Count of button releases (set to zero after call).
  1047.        XCord:    Horizontal position of mouse cursor at last release.
  1048.        YCord:    Vertical position of mouse cursor at last release.            }
  1049.  
  1050. Function MArea(X1, X2, Y1, Y2: Integer): Boolean;
  1051. {      This function returns TRUE if the mouse cursor is currently within the
  1052.        specified area.                                                         }
  1053.  
  1054. Procedure GetSensitivity(Var HPixel, VPixel, Speed: Word);
  1055. {      This procedure returns the mouse sensitivity information as the number
  1056.        of mouse coordinates per screen pixel.  The parameters are as follows:
  1057.  
  1058.        HPixel: Horizontal coordinates per pixel.
  1059.        VPixel: Vertical coordinates per pixel.
  1060.        Speed:  Double speed threshold.                                         }
  1061.  
  1062. Procedure SetSensitivity(HPixel, VPixel, Speed: Word);
  1063. {      This procedure sets the mouse sensitivity information as the number of
  1064.        mouse coordinates per screen pixel.  The parameters are as follows:
  1065.  
  1066.        HPixel: Horizontal coordinates per pixel (the default is 8).
  1067.        VPixel: Vertical coordinates per pixel (the default is 16).
  1068.        Speed:  Double speed threshold (the default is 64).                     }
  1069.  
  1070. Function MouseLocate(User-defined constant): Word;
  1071. {      This function uses a table of coordinates and returns a value indicating
  1072.        which, if any, set of coordinates the mouse cursor is within.
  1073.  
  1074.        The user-defined constant should be defined as follows:
  1075.  
  1076.        Const
  1077.          CorTable: Array[1..NumEntries,1..4] of Word =
  1078.                    ((NumEntries,0,0,0),
  1079.                     (X1,X2,Y1,Y1)...);
  1080.  
  1081.        For example: There are two options which the user may select by clicking
  1082.                     a mouse button.  The horizontal position of the first ranges
  1083.                     from 352 to 504 and its vertical position is 80.  The
  1084.                     horizontal position of the second option ranges from 352 to
  1085.                     488 and its vertical position is 96.  The user-defined
  1086.                     constant should be defined as follows:
  1087.  
  1088.                     Const
  1089.                       CorTable: Array[1..3,1..4] of Word =
  1090.                                 ((3,0,0,0),
  1091.                                  (352,504,80,80),
  1092.                                  (352,488,96,96));
  1093.  
  1094.  
  1095.        The function is called as follows:
  1096.  
  1097.        Index := MouseLocate(CorTable);
  1098.  
  1099.  
  1100.        Note: The maximum number of entries allowed in the table is 100.        }
  1101.  
  1102.  
  1103. Procedure SetHercGraph;
  1104. {      Calling this procedure before the mouse is initialized ensures that the
  1105.        mouse display routines operate correctly in hercules graphics mode.     }
  1106.  
  1107. Procedure SetGraphicsCursor(HHotSpot,VHotSpot: Byte; MCursor: WordType);
  1108. {      This procedure selects a pre-defined graphics cursor.  The parameters
  1109.        are as follows:
  1110.  
  1111.        HHotSpot: Horizontal hotspot.
  1112.        VHotSpot: Vertical hotspot.
  1113.        MCursor:  Graphics cursor.
  1114.  
  1115.        The unit has one pre-defined graphics cursor available.  It is defined
  1116.        as follows:
  1117.  
  1118.        Const
  1119.          Hand: Array32Word = ($ffff,$ffff,$ffff,$ffff,$ffff,$ffff,$ffff,$ffff,
  1120.                               $ffff,$ffff,$ffff,$ffff,$ffff,$ffff,$ffff,$ffff,
  1121.                               $0000,$0000,$0700,$0500,$0500,$05FC,$0554,$0D54,
  1122.                               $1554,$1004,$0804,$0404,$0208,$0208,$0208,$0208);}
  1123.  
  1124. Procedure SoftwareTextCursor(ScreenMask,CursorMask: Word);
  1125. {      This procedure sets the software text cursor.                           }
  1126.  
  1127. Procedure HardwareTextCursor(FromScanLine,ToScanLine: Byte);
  1128. {      This procedure sets the hardware text cursor.
  1129.  
  1130.        FromScanLine: Start of hardware scan line.
  1131.        ToScanLine:   End of hardware scan line.                                }
  1132.  
  1133.  
  1134. COMMENTS
  1135.  
  1136. A powerful mouse cursor designer is included with the registered version of
  1137. the toolbox.  It was written using this mouse unit.
  1138.  
  1139.  
  1140.                           STRING MANIPULATION ROUTINES
  1141. - ---──────────────────────────────────────────────────────────────────────--- -
  1142.  
  1143. UNIT NAME: Strings.tpu
  1144.  
  1145.  
  1146. PUBLIC DEFINITIONS
  1147.  
  1148. Var
  1149.   StringError: Integer;
  1150. {      Holds an error code if a string error occurred.                         }
  1151.  
  1152. Function Spaces(NumSpaces: Integer): String;
  1153. {      Returns a string containing the specified number of spaces.  NumSpaces
  1154.        must not be greater than 80.  See CopyChar below.                       }
  1155.  
  1156. Function Center(TheString: String; MaxLength: Byte): String;
  1157. {      Centers the contents specified in TheString within the specified width
  1158.        and returns the centered string as the function's result.  If the
  1159.        length of the string is greater than the specified width, StringError
  1160.        will be set equivalent to: The strings length minus MaxLength.          }
  1161.  
  1162. Function CopyChar(TheChar: Char; NumChars: Integer): String;
  1163. {      Replicates the specified character a specified number of times and
  1164.        returns the resulting string as the result of the function.  NumChars
  1165.        must be less than 256.                                                  }
  1166.  
  1167. Function StrToNum(TheString: String): LongInt;
  1168. {      Converts a string to a LongInt.  If an error occurs StringError will be
  1169.        set indicating the position at which it occurred.                       }
  1170.  
  1171. Function NumToStr(Num:Real; Width, Decimals: Byte;
  1172.                   LeadingZeros: Boolean): String;
  1173. {      Converts the specified number to a string with the specified number of
  1174.        decimals within a specified width to allow for right justification.
  1175.        Set LeadingZeros to TRUE to set the filler character to a zero, else
  1176.        FALSE to set it to a space.                                             }
  1177.  
  1178. Function LeftTrim(TheString: String): String;
  1179. {      Trims all the spaces off the leftmost end of the specified string.      }
  1180.  
  1181. Function RightTrim(TheString: String): String;
  1182. {      Trims all the spaces off the rightmost end of the specified string.     }
  1183.  
  1184. Function Upper(TheString: String): String;
  1185. {      Converts the specified string to an upper case string.                  }
  1186.  
  1187. Function Lower(TheString: String): String;
  1188. {      Converts the specified string to a lower case string.                   }
  1189.  
  1190. Function BoolToStr(TheBool: Boolean; Defaults: String): String;
  1191. {      Converts a boolean value to a string.  Defaults specifies the true/
  1192.        false values that the resulting string should inherit in that order.
  1193.        These true/false values MUST be separated by a forward slash (/).  The
  1194.        following is an example of a possible default specification: 'Yes/No'.
  1195.  
  1196.        Examples: BoolToStr(True,'Yes/No') returns 'Yes'
  1197.                  BoolToStr(False,'Yes/No') returns 'No'                        }
  1198.  
  1199. Function StrToBool(TheString: String; Defaults: String): Boolean;
  1200. {      Converts a string to a boolean value.  Defaults specifies the true/
  1201.        false values that must be used to test the input string in that order.
  1202.        These true/false values MUST be separated by a forward slash (/).  The
  1203.        following is an example of a possible default specification: 'Yes/No'.
  1204.  
  1205.        Examples: StrToBool('Yes','Yes/No') returns TRUE
  1206.                  StrToBool('No','Yes/No') returns FALSE                        }
  1207.  
  1208.  
  1209. COMMENTS
  1210.  
  1211. None.
  1212.  
  1213.  
  1214.                                DATE/TIME ROUTINES
  1215. - ---──────────────────────────────────────────────────────────────────────--- -
  1216.  
  1217. UNIT NAME: DateTime.tpu
  1218.  
  1219.  
  1220. PUBLIC DEFINITIONS
  1221.  
  1222. Type
  1223.   Str4 = String[4];
  1224.   Str2 = String[2];
  1225.  
  1226. Function CountryCode: Word;
  1227. {      Returns the country code from the country settings.  The following are
  1228.        the available country codes:
  1229.  
  1230.          1: United States
  1231.          2: French Canada
  1232.          3: Latin America
  1233.         31: Netherlands
  1234.         32: Belgium
  1235.         33: France
  1236.         34: Spain
  1237.         36: Hungary
  1238.         38: Yugoslavia
  1239.         39: Italy
  1240.         41: Switzerland
  1241.         42: Czechoslovakia
  1242.         44: United Kingdom
  1243.         45: Denmark
  1244.         46: Sweden
  1245.         47: Norway
  1246.         48: Poland
  1247.         49: Germany
  1248.         55: Brazil
  1249.         61: International English
  1250.         81: Japan
  1251.         82: Korea
  1252.         86: China
  1253.         90: Turkey
  1254.        351: Portugal
  1255.        354: Iceland
  1256.        358: Finland
  1257.        785: Saudi Arabia
  1258.        972: Israel                                                             }
  1259.  
  1260. Function CountryDateFormat: Word;
  1261. {      Returns the country date format from the country settings.              }
  1262.  
  1263. Function CountryCurrency: Str4;
  1264. {      Returns the country currency from the country settings.                 }
  1265.  
  1266. Function CountryThouSep: Char;
  1267. {      Returns the country thousand separator from the country settings.       }
  1268.  
  1269. Function CountryDecSep: Char;
  1270. {      Returns the country decimal separator from the country settings.        }
  1271.  
  1272. Function CountryDateSep: Char;
  1273. {      Returns the country date separator from the country settings.           }
  1274.  
  1275. Function CountryTimeSep: Char;
  1276. {      Returns the country time separator from the country settings.           }
  1277.  
  1278. Function CountryCurrFormat: Byte;
  1279. {      Returns the country currency format from the country settings.          }
  1280.  
  1281. Function CountryTimeFormat: Byte;
  1282. {      Returns the country time format from the country settings.              }
  1283.  
  1284. Function LeapYear(Year:Word): Boolean;
  1285. {      Returns a TRUE value if the year specified is a leap year, else FALSE.  }
  1286.  
  1287. Function DaysInMonth(Year,Month: Word): Byte;
  1288. {      Returns the number of days in the specified month and year.             }
  1289.  
  1290. Function DayOfWeek(Year,Month,Day: Word): Byte;
  1291. {      Returns the day of week for the year, month and day combination
  1292.        specified.                                                              }
  1293.  
  1294. Function DayOfWeekDesc(Day: Word): String;
  1295. {      Returns the description for the specified day of the week.              }
  1296.  
  1297. Function DayOfYear(Year,Month,Day: Word): Word;
  1298. {      Returns the day of the year for the year, month and day combination
  1299.        specified.  Valid for all years from 1901 to 2078.                      }
  1300.  
  1301. Function MonthDesc(Month: Word): String;
  1302. {      Returns the description for the specified month of the year.            }
  1303.  
  1304. Function DateStr(Year,Month,Day: Word; Format: Byte; DateSep: Char): String;
  1305. {      Formats the specified date according to the format specified using the
  1306.        specified date separator.  The formats supported are:
  1307.  
  1308.        0:  mm/dd/yy
  1309.        1:  dd/mm/yy
  1310.        2:  dd/mm/yyyy
  1311.        3:  mm/dd/yyyy
  1312.        4:  [d]d xxx yyyy   (xxx is alpha month of 3 Chars)
  1313.        5:  xxx [d]d, yyyy
  1314.        6:  [d]d FullAlphaMth yyyy
  1315.        7:  FullAlphaMth [d]d, yyyy
  1316.        8:  [d]d-xxx-yy
  1317.        9:  xxx [d]d, 'yy                                                       }
  1318.  
  1319. Function ValidDate(Year,Month,Day: Word; Var ErrorCode: Byte): Boolean;
  1320. {      Returns a TRUE value if the date specified is a valid one.  If it is
  1321.        invalid, a relevant error code will be returned in ErrorCode as follows:
  1322.  
  1323.        Year out of range (< 1901 or > 2078) bit 0 of errorcode is set.
  1324.        Month < 1 or > 12                    bit 1 of errorcode is set.
  1325.        Day < 1 or > 31                      bit 2 of errorcode is set.
  1326.        Day out of range For month           bit 2 of errorcode is set.         }
  1327.  
  1328. Function TimeStr(Hour,Min,Sec,Format:Byte; TimeSep: Char): String;
  1329. {      Formats the specified time according to the format specified using the
  1330.        specified time separator.  The formats supported are:
  1331.  
  1332.        0:  hh:mm xx   (xx is am or pm)
  1333.        1:  hh:mm
  1334.        2:  [h]h hours, [m]m minutes, [s]s seconds
  1335.        3:  [h]h hrs [m]m min [s]s sec
  1336.        4:  TotalSeconds
  1337.        5:  hh:mm:ss
  1338.        6:  [h]h:mm xx                                                          }
  1339.  
  1340. Function SecondsToTime(Seconds: LongInt; Format: Byte; TimeSep: Char): String;
  1341. {      Converts the specified number of seconds to a time using the specified
  1342.        format and time separator.  Refer to the procedure above, TimeStr, to
  1343.        see the formats supported.                                              }
  1344.  
  1345.  
  1346. COMMENTS
  1347.  
  1348. NOTE: Each value for Year MUST be a full value ie four digits eg 1994 not 94.
  1349.  
  1350.  
  1351.                                 WINDOW ROUTINES
  1352. - ---──────────────────────────────────────────────────────────────────────--- -
  1353.  
  1354. UNIT NAME: Win.tpu
  1355.  
  1356.  
  1357. PUBLIC DEFINITIONS
  1358.  
  1359. Type
  1360.   TitleStr = String[80];
  1361.   FrameChars = Array[1..8] of Char;
  1362.   WinState = Record
  1363.     WindMin, WindMax: Word;
  1364.     XCor,
  1365.     YCor,
  1366.     Attr:    Byte;
  1367.   end;
  1368.   TitleStrPtr = ^TitleStr;
  1369.   WinRecPtr = ^WinRec;
  1370.   WinRec = Record
  1371.              Next      : WinRecPtr;
  1372.              State     : WinState;
  1373.              Title,
  1374.              Message   : TitleStrPtr;
  1375.              TitleAttr,
  1376.              FrameAttr : Byte;
  1377.              WinBuffer : Pointer;
  1378.            end;
  1379.  
  1380. Const
  1381.   SingleFrame: FrameChars = '┌─┐││└─┘';
  1382.   DoubleFrame: FrameChars = '╔═╗║║╚═╝';
  1383.   NoFrame    : FrameChars = '        ';
  1384.  
  1385. Var
  1386.   Ch          : Char;
  1387.   TopWindow   : WinRecPtr;
  1388.   WindowCount : Word;
  1389. {      The number of windows currently open                                    }
  1390.  
  1391. procedure WriteWinXY(X, Y: Byte; S: String; Attr: Byte);
  1392. {      Writes the specified string at the specified position relative to the
  1393.        window using the specified atttribute.                                  }
  1394.  
  1395. procedure WriteWinChar(X, Y, Count: Byte; Ch: Char; Attr: Byte);
  1396. {      Copies the specified character Count times at the specified position
  1397.        relative to the window using the specified attribute.                   }
  1398.  
  1399. Procedure OpenWindow(X1,Y1,X2,Y2: Byte; T: TitleStr; M: TitleStr;
  1400.                      DFrame: FrameChars; TAttr, FAttr: Byte; Border: Boolean);
  1401. {      Opens a window at the specified position (X1,Y1),(X2,Y2).  Specify the
  1402.        title of the window in parameter T and the message (to be displayed at
  1403.        the bottom of the window) in parameter M.  Specify the type of frame
  1404.        in the DFrame parameter (SingleFrame, DoubleFrame, NoFrame).  Specify
  1405.        the text attribute in TAttr and the frame attribute in FAttr.  Set
  1406.        Border to TRUE if you require a shadow, else set to FALSE.              }
  1407.  
  1408. Procedure CloseWindow;
  1409. {      Closes the last window opened.                                          }
  1410.  
  1411. Procedure DrawBox(X1,Y1,X2,Y2: Byte; T: TitleStr; M: TitleStr;
  1412.                   DFrame: FrameChars; TAttr, FAttr: Byte; Border: Boolean);
  1413. {      The parameter are the same as for opening a window, see description for
  1414.        OpenWindow.                                                             }
  1415.  
  1416.  
  1417. COMMENTS
  1418.  
  1419. None.
  1420.  
  1421.                                   VGA ROUTINES
  1422. - ---──────────────────────────────────────────────────────────────────────--- -
  1423.  
  1424. UNIT NAME: Vga256.tpu
  1425.  
  1426.  
  1427. PUBLIC DEFINITIONS
  1428.  
  1429. Type
  1430.   TRGB = record
  1431.     Red, Green, Blue: Byte;
  1432.   end;
  1433.   PaletteType = Array[0..255] of TRGB;
  1434. {      Define all palette variables using this type                            }
  1435.  
  1436. Procedure FadeOut(Red, Green, Blue, Steps : Byte);
  1437. {      Fades the palette to the specified colours in a specified number of
  1438.        steps.  The smaller Steps is the faster the fade.                       }
  1439.  
  1440. Procedure FadeIn(Var Pal: PaletteType; Steps: Byte);
  1441. {      Fades the palette to the specified palette in a specified number of
  1442.        steps.  The smaller Steps is the faster the fade.                       }
  1443.  
  1444. Procedure GetPalette(Var Palette: PaletteType);
  1445. {      Stores the current 256 colour VGA palette in the specified variable.                   }
  1446.  
  1447. Procedure SetPalette(Var Palette: PaletteType);
  1448. {      Sets the 256 colour VGA palette to the specified palette bypassing BIOS.
  1449.        BIOS.                                                                   }
  1450.  
  1451. Procedure WaitForRetrace;
  1452. {      Waits for a vertical retrace to complete.  Useful for reducing flicker. }
  1453.  
  1454.  
  1455. COMMENTS
  1456.  
  1457. These routines can be used for both text and graphics modes.
  1458.  
  1459.  
  1460.                                  BIOS ROUTINES
  1461. - ---──────────────────────────────────────────────────────────────────────--- -
  1462.  
  1463. UNIT NAME: Bios.tpu
  1464.  
  1465.  
  1466. PUBLIC DEFINITIONS
  1467.  
  1468. Var
  1469.   KeyFlag1  : Byte
  1470. {      Keyboard flag byte 1
  1471.  
  1472.             │7│6│5│4│3│2│1│0│
  1473.                  │ │ │ │ │ │ │ └─── right shift key depressed
  1474.                  │ │ │ │ │ │ └──── left shift key depressed
  1475.                  │ │ │ │ │ └───── CTRL key depressed
  1476.                  │ │ │ │ └────── ALT key depressed
  1477.                  │ │ │ └─────── scroll-lock is active
  1478.                  │ │ └──────── num-lock is active
  1479.                  │ └───────── caps-lock is active
  1480.              └────────── insert is active                                      }
  1481.  
  1482.   KeyFlag2  : Byte
  1483. {      Keyboard flag byte 2
  1484.  
  1485.             │7│6│5│4│3│2│1│0│
  1486.                  │ │ │ │ │ │ │ └─── left CTRL key depressed
  1487.                  │ │ │ │ │ │ └──── left ALT key depressed
  1488.                  │ │ │ │ │ └───── system key depressed and held
  1489.                  │ │ │ │ └────── suspend key has been toggled
  1490.                  │ │ │ └─────── scroll lock key is depressed
  1491.                  │ │ └──────── num-lock key is depressed
  1492.                  │ └───────── caps-lock key is depressed
  1493.              └────────── insert key is depressed                               }
  1494.  
  1495.   KeyFlag3  : Byte
  1496. {      Keyboard flag byte 3
  1497.  
  1498.             │7│6│5│4│3│2│1│0│ Keyboard mode/type
  1499.                  │ │ │ │ │ │ │ └─── last code was the E1 hidden code
  1500.                  │ │ │ │ │ │ └──── last code was the E0 hidden code
  1501.                  │ │ │ │ │ └───── right CTRL key depressed
  1502.                  │ │ │ │ └────── right ALT key depressed
  1503.                  │ │ │ └─────── 101/102 enhanced keyboard installed
  1504.                  │ │ └──────── force num-lock if Rd ID & KBX
  1505.                  │ └───────── last char was first ID char
  1506.              └────────── read ID in process                                    }
  1507.  
  1508.   EquipFlag1: Byte
  1509. {      Equipment list flag 1
  1510.  
  1511.             │7│6│5│4│3│2│1│0│
  1512.                  │ │ │ │ │ │ │ └─ IPL diskette installed
  1513.                  │ │ │ │ │ │ └── math coprocessor
  1514.                  │ │ │ │ ├─┼─── old PC system board RAM < 256K
  1515.                  │ │ │ │ │ └── pointing device installed (PS/2)
  1516.                  │ │ │ │ └─── not used on PS/2
  1517.                  │ │ └─┴──── initial video mode
  1518.              └─┴─────── # of diskette drives, less 1                           }
  1519.  
  1520.   EquipFlag2: Byte
  1521. {      Equipment list flag 2
  1522.  
  1523.             │7│6│5│4│3│2│1│0│
  1524.                  │ │ │ │ │ │ │ └─ 0 if DMA installed
  1525.                  │ │ │ │ └─┴─┴── number of serial ports
  1526.                  │ │ │ └─────── game adapter
  1527.                  │ │ └──────── not used, internal modem (PS/2)
  1528.              └─┴───────── number of printer ports                              }
  1529.  
  1530. Procedure Wait(Ms: Word);
  1531. {      Waits Ms milliseconds.  I wrote this assembly routine so that I could
  1532.        issue a delay that would be the same length no matter how fast the
  1533.        computer is (valid for AT computers and after).  Note that Turbo Pascal's
  1534.        Delay procedure waits Ms milliseconds, but the faster the computer is,
  1535.        the shorter the delay.                                                  }
  1536.  
  1537. Procedure Beep(Hz, Ms: Word);
  1538.  
  1539. {      This assembly routine emits a beep of frequency Hz and of length Ms.  It
  1540.        uses the Wait routine above which means that the beep will sound for the
  1541.        same length of time no matter how fast the computer is (valid for AT
  1542.        computers an after).                                                    }
  1543.  
  1544. Procedure WarmBoot;
  1545. {      Warm boots the machine.                                                 }
  1546.  
  1547. Procedure ColdBoot;
  1548. {      Issues a disk reset (DOS function 0D) and cold boots the machine.  Use
  1549.        with caution.  It is the programmer's responsiblility to ensure that
  1550.        cache buffers are flushed.                                              }
  1551.  
  1552. Procedure SetTypematicRate(TypeRate,TypeDelay: Byte);
  1553. {      Used on AT machines with extended keyboard support.
  1554.  
  1555.        TypeDelay may be one of the following:
  1556.  
  1557.              0 = 250ms     2 = 750ms
  1558.              1 = 500ms     3 = 1000ms
  1559.  
  1560.        TypeRate may be one of the following:
  1561.  
  1562.              00 - 30.0      01 - 26.7      02 - 24.0      03 - 21.8
  1563.              04 - 20.0      05 - 18.5      06 - 17.1      07 - 16.0
  1564.              08 - 15.0      09 - 13.3      0A - 12.0      0B - 10.9
  1565.              0C - 10.0      0D - 9.2       0E - 8.6       0F - 8.0
  1566.              10 - 7.5       11 - 6.7       12 - 6.0       13 - 5.5
  1567.              14 - 5.0       15 - 4.6       16 - 4.3       17 - 4.0
  1568.              18 - 3.7       19 - 3.3       1A - 3.0       1B - 2.7
  1569.              1C - 2.5       1D - 2.3       1E - 2.1       1F - 2.0             }
  1570.  
  1571. Procedure ResetTypematicRate;
  1572. {      Sets typematic rate to default.                                         }
  1573.  
  1574. Function  RShiftPressed: Boolean;
  1575. {      Returns TRUE if the right shift key is pressed, else FALSE.               }
  1576.  
  1577. Function  LShiftPressed: Boolean;
  1578. {      Returns TRUE if the left shift key is depressed, else FALSE.            }
  1579.  
  1580. Function  CtrlPressed: Boolean;
  1581. {      Returns TRUE if CTRL is depressed, else FALSE.                          }
  1582.  
  1583. Function  AltPressed: Boolean;
  1584. {      Returns TRUE if ALT is depressed, else FALSE.                           }
  1585.  
  1586. Function  ScrollLockOn: Boolean;
  1587. {      Returns TRUE if scroll lock mode is on, else FALSE.                     }
  1588.  
  1589. Function  NumLockOn: Boolean;
  1590. {      Returns TRUE if number lock is on, else FALSE.                          }
  1591.  
  1592. Function  CapsLockOn: Boolean;
  1593. {      Returns TRUE if caps lock is on, else FALSE.                            }
  1594.  
  1595. Function  InsertOn: Boolean;
  1596. {      Returns TRUE if insert mode is on, else FALSE.                          }
  1597.  
  1598. Function  LCtrlPressed: Boolean;
  1599. {      Returns TRUE if the left CTRL key is depressed, else FALSE.             }
  1600.  
  1601. Function  LAltPressed: Boolean;
  1602. {      Returns TRUE if the left ALT key is depressed, else FALSE.              }
  1603.  
  1604. Function  RCtrlPressed: Boolean;
  1605. {      Returns TRUE if the right CTRL key is depressed, else FALSE.            }
  1606.  
  1607. Function  RAltPressed: Boolean;
  1608. {      Returns TRUE if the right ALT key is depressed, else FALSE.             }
  1609.  
  1610. Function  SysPressed: Boolean;
  1611. {      Returns TRUE if the systems request key is depressed, else FALSE.       }
  1612.  
  1613. Function  SuspendToggled: Boolean;
  1614. {      Returns TRUE if suspend is toggled, else FALSE.                         }
  1615.  
  1616. Function  ScrollLockPressed: Boolean;
  1617. {      Returns TRUE if the scroll lock key is depressed, else FALSE.           }
  1618.  
  1619. Function  NumLockPressed: Boolean;
  1620. {      Returns TRUE if the number lock key is depressed, else FALSE.           }
  1621.  
  1622. Function  CapsPressed: Boolean;
  1623. {      Returns TRUE if the caps lock key is depressed, else FALSE.             }
  1624.  
  1625. Function  InsertPressed: Boolean;
  1626. {      Returns TRUE if the insert key is depressed, else FALSE.                }
  1627.  
  1628. Procedure SetScrollLockOn;
  1629. {      Sets scroll lock mode on.                                               }
  1630.  
  1631. Procedure SetNumLockOn;
  1632. {      Sets number lock on.                                                    }
  1633.  
  1634. Procedure SetCapsLockOn;
  1635. {      Sets caps lock on.                                                      }
  1636.  
  1637. Procedure SetInsertOn;
  1638. {      Sets insert mode on.                                                    }
  1639.  
  1640. Procedure SetScrollLockOff;
  1641. {      Sets scroll lock mode off.                                              }
  1642.  
  1643. Procedure SetNumLockOff;
  1644. {      Sets number lock mode off.                                              }
  1645.  
  1646. Procedure SetCapsLockOff;
  1647. {      Sets caps lock off.                                                     }
  1648.  
  1649. Procedure SetInsertOff;
  1650. {      Sets insert mode off.                                                   }
  1651.  
  1652. Function  NumHardDisks: Byte;
  1653. {      Returns the number of hard disks present.                               }
  1654.  
  1655. Function  NumFloppies: Byte;
  1656. {      Returns the number of floppy drives present.                            }
  1657.  
  1658. Function  ActiveFloppy: Byte;
  1659. {      Returns the active floppy.  Useful for detecting if there is a phantom
  1660.        drive present.  0 = A: and 1 = B:                                       }
  1661.  
  1662. Function  PrinterStatus(Port: Word): Byte;
  1663. {      Returns the current printer status byte.  Note that not all printers
  1664.        return reliable status information; bit 3 and bit 7 are usually
  1665.        reliable.
  1666.  
  1667.              │7│6│5│4│3│2│1│0│
  1668.              │ │ │ │ │ │ │ └────  time-out
  1669.              │ │ │ │ │ └─┴─────  unused
  1670.              │ │ │ │ └────────  1 = I/O error  (parallel pin 15)
  1671.              │ │ │ └─────────  1 = printer selected/on-line  (parallel pin 13)
  1672.              │ │ └──────────  1 = out of paper  (parallel pin 12)
  1673.              │ └───────────  1 = printer acknowledgment  (parallel pin 10)
  1674.              └────────────  1 = printer not busy  (parallel pin 11)            }
  1675.  
  1676. Function  PrinterTimeOut(Port: Word): Boolean;
  1677. {      Returns TRUE if printer has timed out, else FALSE.                      }
  1678.  
  1679. Function  PrinterIOError(Port: Word): Boolean;
  1680. {      Returns TRUE if a printer I/O error has occurred, else FALSE.          }
  1681.  
  1682. Function  PrinterSelected(Port: Word): Boolean;
  1683. {      Returns TRUE if the printer is selected, else FALSE.                   }
  1684.  
  1685. Function  PrinterOutOfPaper(Port: Word): Boolean;
  1686. {      Returns TRUE if the printer is out of paper, else FALSE.               }
  1687.  
  1688. Function  PrinterAcknowledge(Port: Word): Boolean;
  1689. {      Returns TRUE if the printer is acknowledged, else FALSE.               }
  1690.  
  1691. Function  PrinterNotBusy(Port: Word): Boolean;
  1692. {      Returns TRUE if the printer is not busy, else FALSE.                   }
  1693.  
  1694. Function  MathCoPresent: Boolean;
  1695. {      Returns TRUE if a math co-processor is present, else FALSE.            }
  1696.  
  1697. Function  DMAInstalled: Boolean;
  1698. {      Returns TRUE if DMA is installed, else FALSE.                          }
  1699.  
  1700. Function  NumSerialPorts: Byte;
  1701. {      Returns the number of serial ports.                                    }
  1702.  
  1703. Function  GameAdapterPresent: Boolean;
  1704. {      Returns TRUE is a game adapter is present, else FALSE.                 }
  1705.  
  1706. Function  NumPrinterPorts: Byte;
  1707. {      Returns the number of printer ports.                                   }
  1708.  
  1709.  
  1710. COMMENTS
  1711.  
  1712. None.
  1713.  
  1714.  
  1715.                              MISCELLANEOUS ROUTINES
  1716. - ---──────────────────────────────────────────────────────────────────────--- -
  1717.  
  1718. UNIT NAME: Misc.tpu
  1719.  
  1720.  
  1721. PUBLIC DEFINITIONS
  1722.  
  1723. Function  CommandLine: String;
  1724. {      Returns the command line following the program name.                    }
  1725.  
  1726. Procedure KeyBoardOff;
  1727. {      Turns the keyboard off.                                                 }
  1728.  
  1729. Procedure KeyBoardOn;
  1730. {      Turns the keyboard on.                                                  }
  1731.  
  1732. Procedure ClearKeyBuffer;
  1733. {      Clears the keyboard buffer.                                             }
  1734.  
  1735. Function CPUType: Byte;
  1736. {      Returns the CPU type for the current machine.  CPUType will be one of
  1737.        the following:
  1738.  
  1739.        1 = 8086
  1740.        2 = 80286
  1741.        3 = 80386
  1742.        4 = 80486                                                               }
  1743.  
  1744. Procedure GetCPUSpeed(Var Mhz, KHz: Word);
  1745. {      Returns an estimate of the CPU speed of the current machine into the
  1746.        specified variables.                                                    }
  1747.  
  1748. Procedure SetPauseOff;
  1749. {      Latches onto the timer interrupt ($08) to enable pause presses to be
  1750.        ignored.                                                                }
  1751.  
  1752. Procedure SetPauseOn;
  1753. {      Restores the timer interrupt ($08).  Used after previously setting
  1754.        pause off using SetPauseOff.                                            }
  1755.  
  1756. Procedure SetPrtScrOff;
  1757. {      Latches onto the print-screen interrupt ($05) to enable print screen
  1758.        presses to be ignored.                                                  }
  1759.  
  1760. Procedure SetPrtScrOn;
  1761. {      Restores the print-screen interrupt ($05).  Used after previously
  1762.        setting print screen off using SetPrtScrOff.                            }
  1763.  
  1764.  
  1765. COMMENTS
  1766.  
  1767. None.
  1768.  
  1769.  
  1770.                                 EDITOR ROUTINES
  1771. - ---──────────────────────────────────────────────────────────────────────--- -
  1772.  
  1773. UNIT NAME: Editor.tpu
  1774.  
  1775.  
  1776. PUBLIC DEFINITIONS
  1777.  
  1778. Type
  1779.   BuffType = Array[1..1] of Char;
  1780.   BuffPtr = ^BuffType;
  1781.   BufferRec = Record
  1782.                 Buff       : BuffPtr; { The buffer                         }
  1783.                 BuffSize,             { Set when the buffer is initialized }
  1784.                 TextSize   : Word;    { The size of the text in the buffer }
  1785.                 ChangesMade: Boolean; { Holds a TRUE value if the text has }
  1786.                                       { changed else FALSE if it has not.  }
  1787.               end;
  1788.   BufferPtr = ^BufferRec;
  1789.   PosType = (AtStart,AtEnd,AsIs);
  1790.  
  1791.  
  1792. Var
  1793.   Buffer: BufferPtr;
  1794.  
  1795. Procedure InitBuffer(Var Buffer: BufferPtr; Size: Word);
  1796. {      Allocates the specified amount of bytes of buffer memory to the
  1797.        specified buffer, initializes its variables and sets ChangesMade to
  1798.        FALSE.  This procedure MUST be called before the editor is called.      }
  1799.  
  1800. Procedure FreeBuffer(Var Buffer: BufferPtr);
  1801. {      Deallocates the memory allocated to the specified buffer.               }
  1802.  
  1803. Procedure ClearBuffer(Var Buffer: BufferPtr);
  1804. {      Empties the buffer and resets it's variables.  It does not affect then
  1805.        ChangesMade variable.                                                   }
  1806.  
  1807. Procedure EditText(Var Buffer: BufferPtr; X1,Y1,BoxLength,
  1808.                    BoxDepth: Byte; LegalChars: CharSet; UpperOnly: Boolean;
  1809.                    NormalEndChars: CharSet; ExtEndChars: CharSet;
  1810.                    Var TerminateChar: Char; Var Extended: Boolean;
  1811.                    DoUpdate: Boolean; Position: PosType; Initialize: Boolean;
  1812.                    UpdateProc: Routine);
  1813. {      Calls the editor and edits the text in the specified buffer.  The various
  1814.        parameters are explained below:
  1815.  
  1816.        Buffer:         The buffer containing the text to be edited.
  1817.        X1:             The X-position of the top-left corner of the edit window.
  1818.        Y1:             The Y-position of the top-left corner of the edit window.
  1819.        BoxLength:      The length of the edit window.
  1820.        BoxDepth:       The depth of the edit window.
  1821.        LegalChars:     This is a set containing the legal characters the user
  1822.                        may enter.
  1823.        UpperOnly:      If TRUE is specified then all characters entered will be
  1824.                        changed to uppercase.
  1825.        NormalEndChars: This is a set of legal normal keys the user may press to
  1826.                        terminate the editing eg ENTER,CTRL-ENTER.
  1827.        ExtEndChars:    This is a set of legal extended keys the user may press
  1828.                        to terminate the editing eg ALT-X,ALT-P.
  1829.        TerminateChar:  Returns the key the user pressed to terminate the
  1830.                        editing.
  1831.        Extended:       Returns TRUE if the terminate key was an extended key
  1832.                        else FALSE if it was not.
  1833.        DoUpDate:       If TRUE is specified then the routine will execute the
  1834.                        update procedure specified as the last parameter of this
  1835.                        routine else it will not.
  1836.        Position:       Position can be one of three values: AtStart, AtEnd or
  1837.                        AsIs.  AtStart causes the beginning of the text to be
  1838.                        displayed initially, AtEnd causes the end of the text to
  1839.                        be displayed initially and AsIs causes the text to be
  1840.                        displayed as it was last.
  1841.        Initialize:     If TRUE is specified then the ClearBuffer procedure will
  1842.                        be called automaticaly before editing commences.
  1843.        UpDateProc:     This is the update routine that will be executed while
  1844.                        the routine waits for a keypress, provided that DoUpDate
  1845.                        was set to TRUE.  This is a powerful feature added
  1846.                        recently to allow, for example, a clock to be displayed,
  1847.                        or to trap additional keys like F1 or ALT-X and execute
  1848.                        a procedure for each.  Refer to the comments for the
  1849.                        'Input Routines' section.
  1850.  
  1851.        The following keys may be used during data input:
  1852.  
  1853.        Up-Arrow:    Moves the cursor one line up.
  1854.        Down-Arrow:  Moves the cursor one line down.
  1855.        Left-Arrow:  Moves the cursor one position to the left.
  1856.        Right-Arrow: Moves the cursor one position to the right.
  1857.        Home:        Moves the cursor to the beginning of the line.
  1858.        End:         Moves the cursor to the end of the line.
  1859.        Page-Up:     Moves the cursor one page up.
  1860.        Page-Down:   Moves the cursor one page down.
  1861.        Ctrl-Home:   Moves the cursor to the beginning of the text.
  1862.        Ctrl-End:    Moves the cursor to the end of the text.
  1863.        Ctrl-Left:   Moves the cursor to the beginning of the previous word.
  1864.        Ctrl-Right:  Moves the cursor to the beginning of the next word.
  1865.        Tab:         Tabs the cursor to the right (does not insert a TAB
  1866.                     character).
  1867.        Shift-Tab:   Tabs the cursor to the left (does not insert a TAB
  1868.                     character).
  1869.  
  1870.        Insert:      Toggles insert mode.
  1871.        Backspace:   Deletes the character to the left of the cursor.
  1872.        Delete:      Deletes the character beneath the cursor.
  1873.        Ctrl-Y:      Deletes the current line.
  1874.        Ctrl-E:      Deletes from the current line to the end of the text.
  1875.        Ctrl-C:      Centers the current line.
  1876.        Enter:       Moves the cursor to the next line (insert mode off).
  1877.        Enter:       Inserts a line (insert mode on).
  1878.  
  1879. The ChangesMade variable for the specified buffer is set to TRUE if any changes
  1880. are made to the text.  This variable can be changed by the programmer as can
  1881. Buff and TextSize.  Do NOT alter BuffSize as it is for reference only.  You
  1882. may alter the buffer contents as long as TextSize is altered accordingly and
  1883. that it is done before or after EditText is called - not from within it.       }
  1884.  
  1885. Procedure LoadBuffer(Var Buffer: BufferPtr; FileName: String;
  1886.                      Var ErrorCode: Integer);
  1887. {      Loads the specified file into the buffer and returns IOResult to the
  1888.        ErrorCode variable.  This procedure checks for all I/O errors and
  1889.        returns the result and therefore won't crash at any point.  If the file
  1890.        is too large to fit into the buffer, it will load as much as it can and
  1891.        return an ErrorCode of 255 (file to large, only partially read).        }
  1892.  
  1893. Procedure SaveBuffer(Var Buffer: BufferPtr; FileName: String;
  1894.                      Var ErrorCode: Integer);
  1895. {      Saves the buffer to the specified file and returns IOResult to the
  1896.        ErrorCode variable.  This procedure checks for all I/O errors and
  1897.        returns the result and therefore won't crash at any point.              }
  1898.  
  1899.  
  1900. COMMENTS
  1901.  
  1902. The maximum buffer size which can be specified is 65,535.  I have not found a
  1903. need for a buffer size greater than this, but am considering increasing this
  1904. limit.
  1905.  
  1906.  
  1907.                                  FILE ROUTINES
  1908. - ---──────────────────────────────────────────────────────────────────────--- -
  1909.  
  1910. UNIT NAME: Files.tpu
  1911.  
  1912.  
  1913. PUBLIC DEFINITIONS
  1914.  
  1915. Function Exists(FName: String): Boolean;
  1916. {      Returns TRUE if the specified file exists else returns FALSE.           }
  1917.  
  1918. Function FileMatch(FName, FSpec: String): Boolean;
  1919. {      Returns TRUE is the specified file matches the file specification FSpec.
  1920.        For example, FileMatch('DEMOFIL.EXE','*.EXE') returns TRUE.             }
  1921.  
  1922. Function IsDirectory(FName: String): Boolean;
  1923. {      Returns TRUE if the specified file is a directory.                      }
  1924.  
  1925.  
  1926. COMMENTS
  1927.  
  1928. This unit is still under development.
  1929.  
  1930.  
  1931.                                   LZH ROUTINES
  1932. - ---──────────────────────────────────────────────────────────────────────--- -
  1933.  
  1934. UNIT NAME: Lzh.tpu
  1935.  
  1936.  
  1937. PUBLIC DEFINITIONS
  1938.  
  1939. Procedure InitLZHBuffers(BufferSize: Word);
  1940. {      Allocates the internal buffers to be used to compress and decompress
  1941.        data.  BufferSize specifies the size of the buffers to be used. This
  1942.        procedure MUST be called before the following are used.                 }
  1943.  
  1944. Procedure FreeLZHBuffers;
  1945. {      De-allocates the buffers allocated using the InitLZHBuffers procedure.  }
  1946.  
  1947. Procedure Encode(ReadRoutine: Routine; WriteRoutine: Routine;
  1948.                  Bytes: LongInt);
  1949. {      Encodes data using the program-defined read routine and write routine.
  1950.        Bytes specifies the number of Bytes to encode.  By allowing the
  1951.        programmer to specify the read and write routines provides much
  1952.        flexibility.  Disk files can the read, encoded, and written to disk;
  1953.        read, and encoded directly into a memory variable; read, decoded, and
  1954.        written to disk; read, and decoded directly into a memory variable. See
  1955.        the demonstration provided to see how these program-specified routines
  1956.        are used.                                                               }
  1957.  
  1958. Procedure Decode(ReadRoutine: Routine; WriteRoutine: Routine);
  1959. {      Behaves in the same way as Encode, except that the data is decoded.  The
  1960.        number of bytes to be decoded is not specified.  See the demonstration
  1961.        program provided to see how the program-specified routines are used.    }
  1962.  
  1963.  
  1964. COMMENTS
  1965.  
  1966. Refer to the demonstration program provided (DEMOLZH.EXE).
  1967.  
  1968.  
  1969.                                 PARSER ROUTINES
  1970. - ---──────────────────────────────────────────────────────────────────────--- -
  1971.  
  1972. UNIT NAME: Parser.tpu
  1973.  
  1974.  
  1975. PUBLIC DEFINITIONS
  1976.  
  1977. Function Switches: String;
  1978. {      Returns a string containing the switches entered on the command line.
  1979.  
  1980.        Example: DEMOPAR /A /B "PRN" /C
  1981.  
  1982.                 The Switches function returns 'ABC'.                           }
  1983.  
  1984. Function InvalidSwitch(ValidStr, UserStr: String; IgnoreCase: Boolean): String;
  1985. {      Returns a string containing the first invalid switch encountered.
  1986.        ValidStr must be supplied. It includes all the valid switches, while
  1987.        UserStr is the string of switches entered on the command line.  If
  1988.        IgnoreCase is TRUE, the case of the switches is ignored.
  1989.  
  1990.        Example: DEMOPAR /A /B "PRN" /c /D
  1991.  
  1992.                 InvalidSwitch('ABC',Switches,TRUE) returns 'D'.               }
  1993.  
  1994. Function SwitchPos(SwitchChar: Char; IgnoreCase: Boolean): Integer;
  1995. {      Returns the position of the specified switch on the command line.  If
  1996.        the switch does not exist, the function returns 0.  If IgnoreCase is
  1997.        TRUE, the case of the switches is ignored.
  1998.  
  1999.        Example: DEMOPAR /A "PRN" /B
  2000.  
  2001.                 SwitchPos('B',TRUE) returns 3.                                 }
  2002.  
  2003. Function SwitchData(SwitchChar: Char; IgnoreCase: Boolean): String;
  2004. {      Returns the data following the specified switch.  If IgnoreCase is TRUE,
  2005.        the case of the switches is ignored.
  2006.  
  2007.        Example: DEMOPAR /A "PRN" /B10
  2008.  
  2009.                 SwitchData('B',TRUE) returns 10.                               }
  2010.  
  2011. Function Param(N: Byte): String;
  2012. {      Returns the Nth command line parameter.  Note that parameters in quotes
  2013.        are treated as a single parameter and that they include the first quote.
  2014.        This allows you to examine what type of quote was used.
  2015.  
  2016.        Example: DEMOPAR /A COMP.TXT "This is a test"
  2017.  
  2018.                 Param(1) returns COMP.TXT
  2019.                 Param(2) returns "This is a test                               }
  2020.  
  2021. Function NumParams: Byte;
  2022. {      Returns the number of non-switch parameters entered on the command line.
  2023.  
  2024.        Example: DEMOPAR /A COMP.TXT "This is a test"
  2025.  
  2026.                 NumParams returns 2.                                           }
  2027.  
  2028. COMMENTS
  2029.  
  2030. None.
  2031.  
  2032.  
  2033.                                    REVISIONS
  2034. - ---──────────────────────────────────────────────────────────────────────--- -
  2035.  
  2036. Version 1.3                                                    26 September 1994
  2037.  
  2038.   ■ Included a new unit (PARSER.TPU) to allow the parsing of the command line.
  2039.  
  2040.   ■ Added two routines to the FILES.TPU unit: FileMatch and IsDirectory.
  2041.  
  2042.   ■ Added the StrToBool function to the STRINGS.TPU unit to convert a string to
  2043.     a boolean value.  See also the BoolToStr function.
  2044.  
  2045.   ■ Added the Suspend procedure to INPUT.TPU to suspend processing for a
  2046.     specified amount of time, or until a key is pressed.
  2047.  
  2048.   ■ Added the ReadDate procedure to INPUT.TPU to allow the input of a date.
  2049.  
  2050.   ■ Added the ReadTime procedure to INPUT.TPU to allow the input of a time.
  2051.  
  2052.   ■ Added the ReadReal procedure to INPUT.TPU to allow the input of a real
  2053.     value.
  2054.  
  2055.   ■ Added the ReadChoice procedure to INPUT.TPU to allow the input of a string
  2056.     from a list of choices.
  2057.  
  2058.   ■ Added two procedures to the BIOS.TPU unit: Wait and Beep.
  2059.  
  2060.   ■ Modified all routines with Day, Month and Year parameters.  The sequence of
  2061.     these parameters is now Year, Month, Day and each is now of type Word, just
  2062.     like with Turbo Pascal's GetDate routine.  Be sure to change the sequence
  2063.     in your existing programs that use the toolbox, or just keep the version
  2064.     they use aside.
  2065.  
  2066.   ■ Released version 1.3 of the toolbox (TOOLS7v13.ARJ) for use with Turbo
  2067.     Pascal 7.0 due to popular demand.  I apologize for the delay.
  2068.  
  2069.  
  2070. Version 1.2                                                          1 July 1994
  2071.  
  2072.   ■ Modified the Windows unit - window titles are now placed on the window
  2073.     frame in the best possible position, regardless of the lengths of the titles
  2074.     or whether a shadow is used.
  2075.  
  2076.   ■ Added two very useful routines to the Mouse unit to allow for the reading of
  2077.     mouse movement.  These routines differ to that of the ReadMouseMotion
  2078.     routine.
  2079.  
  2080.   ■ My apologies to those who tried to re-compile the demonstration programs but
  2081.     couldn't.  I forgot to update one or two of them.  Each has been compiled
  2082.     using the modified units and each has been tested.
  2083.  
  2084.  
  2085. Version 1.1                                                        20 April 1994
  2086.  
  2087.   ■ Fixed a bug in the Windows unit - WindowCount was not initially initialized
  2088.     to zero.
  2089.  
  2090.   ■ WriteXY no longer adjusts the current cursor position
  2091.  
  2092.   ■ Added two routines to the Screen unit: SaveLine and RestoreLine.
  2093.  
  2094.   ■ Modifed SaveArea and RestoreArea to allow the saving and restoring using
  2095.     program-defined variables.
  2096.  
  2097.   ■ Modified the OpenWindow and DrawBox routines so as to use the frame
  2098.     attribute for titles and messages.
  2099.  
  2100.   ■ Fixed minor memory de-allocation bug in the window routine.
  2101.  
  2102.   ■ Included a new unit allowing for LZH-type compression and decompression.
  2103.  
  2104.   ■ Modified GetKey and ReadKey to allow a value to be passed to UpdateProc.
  2105.  
  2106.   ■ Modified SaveCursorPos and RestoreCursorPos to allow for multiple saving
  2107.     of cursor states.
  2108.  
  2109.   ■ Modified the save and restore cursor routines to enable RestoreCursor to
  2110.     set the cursor on or off automatically.
  2111.  
  2112.  
  2113.                                    THANKS TO
  2114. - ---──────────────────────────────────────────────────────────────────────--- -
  2115.  
  2116. ■ All those who have responded both positively (and negatively).
  2117. ■ Brad Meier for his suggestions given.
  2118. ■ Those who have registered their copies of the toolbox.
  2119. ■ Those who insisted that I release a version of the toolbox for Turbo Pascal
  2120.   version 7.0.
  2121.  
  2122.  
  2123.                                   NEW VERSIONS
  2124. - ---──────────────────────────────────────────────────────────────────────--- -
  2125.  
  2126. New versions of the toolbox can be found at the following sites:
  2127.  
  2128. ■ ftp.sun.ac.za  (not at present)
  2129. ■ ftp.uwp.edu  (/pub/incoming/programming/pascal/TOOL7Vxx.ARJ)
  2130. ■ ftp.wustl.edu  (/pub/MSDOS_UPLOADS/programming/pascal/TOOL7Vxx.ARJ)
  2131.  
  2132. Versions of the toolbox for use with Turbo Pascal 6.0 (TOOL6Vxx.ARJ) are also
  2133. available at the above sites.
  2134.  
  2135. If you have previously registered a version of the toolbox, you are entitled
  2136. to use any new versions which become available, that is, it is unnecessary
  2137. to re-register.  In this case, the garbled archive can be extracted using the
  2138. same command as was given when you registered.
  2139.  
  2140.  
  2141.                 LOOK OUT FOR OTHER SOFTWARE FROM THE SAME AUTHOR
  2142. - ---──────────────────────────────────────────────────────────────────────--- -
  2143.  
  2144.                  >>> The Turbo Pascal 6.0 Help File Creator <<<
  2145.  
  2146. Create on-line help for your Turbo Pascal programs in an extremely fast,
  2147. efficient and user-friendly manner and eliminate all the messy bits of code from
  2148. your programs when coding on-line help.  You are also able to to create on-line
  2149. manuals or anything of a similar nature.  In this case no Turbo Pascal knowledge
  2150. is necessary.
  2151.  
  2152. A demo version of HFC can be acquired from:
  2153.  
  2154.   ■ the following internet site:
  2155.  
  2156.     ftp.wustl.edu (/pub/MSDOS_UPLOADS/programming/pascal/HFC6Vxx.ARJ) using FTP
  2157.  
  2158.   ■ the following South African BBS (East London):
  2159.  
  2160.     A & M ONLINE (56654)
  2161.  
  2162. - ---──────────────────────────────────────────────────────────────────────--- -
  2163.